package fsoft.com.vn.directory.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import fsoft.com.vn.directory.dao.ContactDAO;
import fsoft.com.vn.directory.form.Contact;

@Service
public class ContactServiceImpl implements ContactService {

	@Autowired
	private ContactDAO contactDAO;
	
	//@Transactional
	//public void addContact(Contact contact) {
	//	contactDAO.addContact(contact);
	//}

	@Transactional
	public List<Contact> listContact() {

		return contactDAO.listContact();
	}

	//@Transactional
	//public void removeContact(Integer id) {
	//	contactDAO.removeContact(id);
	//}
	
	public List<Contact> search(String Firstname, String Surname){
		return contactDAO.search(Firstname, Surname);
	}
}
